package br.com.dev.tcc.view.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
import br.com.dev.tcc.R;

public class DecisionDialog extends Dialog {

	private Button btSim;
	private Button btNao;
	
	public DecisionDialog(Context context) {
		
		super(context, R.style.DialogAppTheme);

		super.getWindow();
		super.requestWindowFeature(Window.FEATURE_NO_TITLE);
		super.setContentView(R.layout.decision_dialog);
		
		btSim = (Button) findViewById(R.id.btSim);
		btNao = (Button) findViewById(R.id.btNao);
	}

	public void setPositiveButtonListener(
			android.view.View.OnClickListener listener) {

		btSim.setOnClickListener(listener);
	}

	public void setNegativeButtonListener(
			android.view.View.OnClickListener listener) {

		btNao.setOnClickListener(listener);
	}

	public void setPositiveText(int textResId) {

		btSim.setText(textResId);
	}

	public void setNegativeText(int textResId) {

		btNao.setText(textResId);
	}
	
	public void setMessage(int textResId) {

		((TextView) findViewById(R.id.message)).setText(textResId);
	}
	
	public void hideImage(){
		((TextView) findViewById(R.id.message)).setCompoundDrawables(null, null, null, null);
	}
}
